package org.csmzxy.class2334.timeclass;

import java.time.LocalDateTime;

public class Example13 {
    public static void main(String[]args) {
        LocalDateTime now = LocalDateTime.now();
        System.out.println("系统当前日期时间为" + now);
        System.out.println("LocalDateTime 对象转换为相应的LocalDate 对象，" + "结果为" + now.toLocalDate());
        System.out.println("LocalDateTime 对象转换为相应的LocalTime 对象，" + "结果为" + now.toLocalTime());
    }
}
